package com.yifeng.repo.endpoint.security.auth;

import com.yifeng.repo.endpoint.security.console.api.dto.AccountDto;
import com.yifeng.repo.endpoint.security.console.api.dto.AccountPermissionDto;
import com.yifeng.repo.endpoint.security.redis.worker.RedisCacheWorker;

import javax.servlet.ServletRequest;

/**
 * Created by daibing on 2023/8/24.
 */
public interface SecurityChecker {

    String consoleType();

    void init(String url, String accessToken, int clientTimeoutMillis, RedisCacheWorker redisCacheWorker, String redisKeyPrefix);

    String checkToken(ServletRequest request);

    AccountDto checkAccount(ServletRequest request, String token);

    AccountPermissionDto checkPermission(String code);

}
